import 'package:flutter/material.dart';

// 单独的搜索栏组件
class SearchAppBar extends StatelessWidget {
  final TextEditingController controller;

  const SearchAppBar({
    super.key,
    required this.controller,
  });

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      height: 40,
      child: TextField(
        controller: controller,
        decoration: InputDecoration(
          hintText: '请输入',
          hintStyle: TextStyle(fontSize: 20.0),
          border: InputBorder.none,
        ),
        onChanged: (value) {
          controller.text = value;
          print(value);
        },
      ),
    );
  }
}
